package server

import (
	"log"
	. "tcp_server/protocol"
)

func readReceiveData(conn *ClientConn) {
	for {
		select {
		case data := <-conn.ReadChan:
			dealReceiveData(string(data))
		case <-conn.StopChan:
			conn.LogConn("stop listen readChan")
			return
		}
	}

}

// 业务处理指令
func dealReceiveData(data string) {
	log.Println("deal message：", data)
}
